Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Fix highlight alignment in emojified gin-log #117

Merged
merged 1 commit into from
Dec 27, 2023

Conversation

ogaken-1
Copy link
Contributor

@ogaken-1 ogaken-1 commented Dec 25, 2023

This fixes highlight alignment in emojified gin-log buffer.

Before fix: Misalignment of highlights in emojified text.

image

After fix: Correct alignment of highlights in emojified text.

image

Summary by CodeRabbit

  • Refactor
    • Enhanced text processing to optionally include emojis based on user settings.

Copy link

coderabbitai bot commented Dec 25, 2023

Walkthrough

The recent update introduces a conditional feature in the exec function, where the application of emojify to arrays content and trimmed is now dependent on a specific flag within options. This modification adds a layer of customization to how content is processed within the function.

Changes

File Path Change Summary
.../command/buffer/edit.ts Conditional emojify application to content and trimmed.

🐇✨
In code's burrow, deep and vast,
A flag was planted; changes cast.
Now emojify may come to pass,
If options decree it so, alas.
🚩🐾

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • You can directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
  • You can tag CodeRabbit on specific lines of code or entire files in the PR by tagging @coderabbitai in a comment. Examples:
    • @coderabbitai generate unit tests for this file
    • @coderabbitai modularize this function
  • You can tag @coderabbitai in a PR comment and ask questions about the PR and the codebase. Use quoted replies to pass the context for follow-up questions. Examples:
    • @coderabbitai gather interesting statistics about this repository and render them in a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai generate unit tests for the src/utils.ts file.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 5f27fb6 and 8f6091b.
Files selected for processing (1)
  • denops/gin/command/buffer/edit.ts (1 hunks)
Additional comments: 2
denops/gin/command/buffer/edit.ts (2)
  • 100-100: The conditional application of the emojify function to the content array is a logical way to handle the emojification based on the options.emojify flag. This should ensure that the text is only emojified when the option is enabled, which aligns with the PR objectives.

  • 105-105: The replacement of the trimmed array with the emojified content is crucial for the fix. However, it's important to verify that this change does not affect other parts of the code where trimmed might be used in its original, unemojified form.

Verification successful

The verification process has confirmed that the trimmed variable is used immediately after its definition and conditional modification within the exec function. There is no evidence from the provided context that trimmed is used elsewhere in a way that would conflict with the change to apply emojify conditionally. The change appears to be safely contained within the local scope of the exec function.

Scripts Executed

The following scripts were executed for the analysis:


Script:

#!/bin/bash
# Verify that the 'trimmed' variable is not used elsewhere in a way that requires it to be unemojified.
rg --type ts "trimmed" --context 5 "denops/gin/command/buffer/edit.ts"

Length of output: 424

Copy link
Owner

@lambdalisue lambdalisue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@lambdalisue
Copy link
Owner

I'll merge it once the CI passed (let me know if I forget)

@ogaken-1
Copy link
Contributor Author

@lambdalisue Could you check the CI results?
I don't understand why the CI is failing.

@lambdalisue lambdalisue merged commit c3b5cb3 into lambdalisue:main Dec 27, 2023
7 checks passed
@ogaken-1 ogaken-1 deleted the fix-ginlog-emojify branch December 27, 2023 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants